using MediatR;
using RBAC.Domain.Dto.Output;
using RBAC.ErrorCode;
using System;

namespace RBAC.Write.Api.Application.Command.ERP.InboundManagement
{
    /// <summary>
    /// 导出采购入库 请求参数
    /// </summary>
    public class ExportPurchaseStorageCommand : IRequest<APIResult<byte[]>>
    {
        /// <summary>页码（导出全部时忽略）</summary>
        public int PageIndex { get; set; } = 1;
        /// <summary>页大小（导出全部时忽略）</summary>
        public int PageSize { get; set; } = 1000;
        /// <summary>是否导出全部</summary>
        public bool ExportAll { get; set; } = false;
        /// <summary>排序，默认Id倒序</summary>
        public string OrderBy { get; set; } = "Id DESC";

        // 过滤条件（与分页查询保持一致）
        public string? OrderCode { get; set; }
        public DateTime? StartDate { get; set; }
        public DateTime? EndDate { get; set; }
        /// <summary>年份（可选）</summary>
        public int? Year { get; set; }
        /// <summary>月份（1-12，可选）</summary>
        public int? Month { get; set; }
        public string? OrderStatus { get; set; }
        public string? BusinessStatus { get; set; }
        public string? Warehouse { get; set; }
        public string? Supplier { get; set; }
    }
}
